package com.iris.live.services.report;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by 林平 on 2016/12/12.
 */
public class ExcelReportContext {
    private String template;
    private String fileName;
    private Map<String, Object> params = new HashMap<>();
    private IExcelReportSource source;
    private boolean staticSheet;
    private int clonableSheet = 0;
    private int startCellIndex = 0;
    private int endCellIndex = 0;
    private boolean autoRowExtended = false;

    public ExcelReportContext() {
    }

    public String getTemplate() {
        return template;
    }

    public ExcelReportContext setTemplate(String template) {
        this.template = template;

        return this;
    }

    public String getFileName() {
        return fileName;
    }

    public ExcelReportContext setFileName(String fileName) {
        this.fileName = fileName;

        return this;
    }

    public Map<String, Object> getParams() {
        return params;
    }

    public ExcelReportContext addParam(String name, Object value) {
        params.put(name, value);

        return this;
    }

    public ExcelReportContext addParams(Map<String, Object> params) {
        this.params.putAll(params);

        return this;
    }

    public IExcelReportSource getSource() {
        return source;
    }

    public ExcelReportContext setSource(IExcelReportSource source) {
        this.source = source;

        return this;
    }

    public boolean isStaticSheet() {
        return staticSheet;
    }

    public ExcelReportContext setStaticSheet(boolean staticSheet) {
        this.staticSheet = staticSheet;

        return this;
    }

    public int getClonableSheet() {
        return clonableSheet;
    }

    public ExcelReportContext setClonableSheet(int clonableSheet) {
        this.clonableSheet = clonableSheet;

        return this;
    }

    public int getStartCellIndex() {
        return startCellIndex;
    }

    public ExcelReportContext setStartCellIndex(int startCellIndex) {
        this.startCellIndex = startCellIndex;

        return this;
    }

    public int getEndCellIndex() {
        return endCellIndex;
    }

    public ExcelReportContext setEndCellIndex(int endCellIndex) {
        this.endCellIndex = endCellIndex;

        return this;
    }

    public boolean isAutoRowExtended() {
        return autoRowExtended;
    }

    public ExcelReportContext setAutoRowExtended(boolean autoRowExtended) {
        this.autoRowExtended = autoRowExtended;

        return this;
    }
}
